package com.chenyongjing.design.pattern.chain.auth.optimize;

import com.chenyongjing.design.pattern.chain.auth.Member;
import org.springframework.util.StringUtils;

/**
 * @Author chen
 * @Date 2022/11/17 22:26
 */
public class ValidateHandler extends Handler {

    @Override
    public void doHandler(Member member) {
        if(StringUtils.isEmpty(member.getLoginName())||StringUtils.isEmpty(member.getLoginPass())){
            System.out.println("用户名和密码为空");
            return;
        }
        System.out.println("用户和密码不为空，可以往下执行");
        next.doHandler(member);
    }
}
